#define  _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	double sign = 0;
	int i = 0;
	double total = 0;
	double n = 0;
	for (i = 1; i <= 100; i++)
	{
		sign = 1.0 / i;
		if (i % 2 == 0)
			sign = -sign;
		total = total + sign;
	}
	printf("total=%lf", total);
	return 0;

}